#ifndef QSEEMAINWIN_H
#define QSEEMAINWIN_H

#include <QtGui/QMainWindow>
#include "Portability.h"
#include "./GeneratedFiles/ui_QSeeMainWin.h"

class QBoxLayout;
class QModelIndex;
class QDirModel;
class FileTableView;
class QTableView;
class AutoSplitter;
class FileTableModel;
class ImgViewWidget;
class QActionGroup;
class QAction;
class QToolBar;
class QProgressDialog;
class QSeeMainWin : public QMainWindow
{
	Q_OBJECT

public:
	QSeeMainWin(QWidget *parent = 0, Qt::WFlags flags = 0);
	~QSeeMainWin();

private slots:
	void onDirTreeViewItemClicked(const QModelIndex &);
	void onActionSetCellSize();

	void switchToBrowseMode();
	void switchToViewMode();

	void onActionGoNext();
	void onActionGoPrev();

	void onActionUseAsWallpaper();
	void onActionUseAsIdCard();

	void onActionProperty();
	void onActionAbout();

	//contexts actions
	void onActionMoveTo();
	void onActionCopyTo();
	void onActionRename();
	void onActionDelete();

	void onActionMark();
	void onActionUnmark();
	void onActionMarkAll();
	void onActionClearMark();


private:
	Ui::QSeeMainWinClass ui;

	QDirModel*  _modelDirs;
	FileTableModel*  _modelFiles;
	FileTableView*  _filesView;
	AutoSplitter*    _browseModePanel;

	ImgViewWidget* _viewModePanel;
	QToolBar*         _viewModeToolBar;

	QActionGroup*   _browseModeActions;
	QActionGroup*   _viewModeActions;

	QAction* _actionView;
	QAction* _actionBack;
	QMenu* _filesViewContextMenu;

	void initFilesViewContextMenu();

	void copyFilesTo(const QStringList& files);
	void moveFilesTo(const QStringList& files);

	QStringList selectedFiles() const;
	QProgressDialog*  _progressDialog;

	QProgressDialog* progressDialog(const QString& label,int max);
};

#endif // QSEEMAINWIN_H
